﻿using System;
using System.Runtime.Serialization;

namespace UpYourLife.Services.Google
{
    /// <summary>
    /// A Google web search result.
    /// </summary>
    [DataContract]
    public class GoogleLocalResult
    {
        /// <summary>
        /// The internal Google class for this object. This will always be "GWebSearch".
        /// </summary>
        [DataMember(Name = "GsearchResultClass", Order = 0)]
        public string GoogleResultClass
        { get; set; }

        [DataMember(Name = "viewportmode", Order = 1)]
        public string ViewPortMode
        { get; set; }
        
        /// <summary>
        /// The unescaped Url of the search result.
        /// </summary>
        [DataMember(Name = "listingType", Order = 2)]
        public string ListingType
        { get; set; }

        [DataMember(Name = "lat", Order = 3)]
        public double Lat
        { get; set; }

        [DataMember(Name = "lng", Order = 4)]
        public double Lng
        { get; set; }

        [DataMember(Name = "accuracy", Order = 5)]
        public int Accuracy
        { get; set; }

        /// <summary>
        /// The formatted search result title.
        /// </summary>
        [DataMember(Name = "title", Order = 6)]
        public string Title
        { get; set; }

        /// <summary>
        /// The unformatted title of the search result.
        /// </summary>
        [DataMember(Name = "titleNoFormatting", Order = 7)]
        public string TitleNoFormatting
        { get; set; }

        [DataMember(Name = "ddUrl", Order = 8)]
        public string DDUrl
        { get; set; }

        [DataMember(Name = "ddUrlToHere", Order = 9)]
        public string DDUrlToHere
        { get; set; }

        [DataMember(Name = "streetAddress", Order = 10)]
        public string StreetAddress
        { get; set; }

        [DataMember(Name = "city", Order = 11)]
        public string City
        { get; set; }

        [DataMember(Name = "region", Order = 12)]
        public string Region
        { get; set; }

        [DataMember(Name = "country", Order = 13)]
        public string Country
        { get; set; }

        [DataMember(Name = "staticMapUrl", Order = 14)]
        public string StaticMapUrl
        { get; set; }

        [DataMember(Name = "url", Order = 15)]
        public string Url
        { get; set; }

        /// <summary>
        /// The Goolge snippet for this search result.
        /// </summary>
        [DataMember(Name = "content", Order = 16)]
        public String Snippet
        { get; set; }

        [DataMember(Name = "maxAge", Order = 17)]
        public int MaxAge
        { get; set; }
        
    }
}
